<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class CreateOpenShopSignOrderLogsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('open_shop_sign_order_logs', function (Blueprint $table) {
            $table->id();
            $table->unsignedBigInteger('orderId')->default(0)->index('orderId')->comment('open_shop_sign_order.id');
            $table->string('content', '120')->default('')->comment('');
            $table->unsignedTinyInteger('type')->default(0)->comment('日志类型，代码里面定义枚举');
            $table->string('operatorName', 32)->default(0)->comment('操作人的姓名');
            $table->unsignedInteger('createdAt')->default(0)->comment('创建时间');
            $table->unsignedInteger('createdByUid')->default(0)->comment('操作人的id，rms后台用户的id，0-系统');
            $table->unsignedInteger('updatedAt')->default(0)->comment('修改时间');
            $table->unsignedInteger('updatedByUid')->default(0)->comment('操作人的id，rms后台用户的id，0-系统');
            $table->collation = 'utf8mb4_general_ci';
            $table->comment = '店铺筹备 - 签约订单日志表';
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('open_shop_sign_order_logs');
    }
}
